import { ScrollView, View, Text, Image } from '@tarojs/components';
import React, { Component } from 'react';
import Taro, { getCurrentInstance } from '@tarojs/taro';
import { connect } from 'react-redux';
import './index.less';
import * as T from './types';
import actions from './actions';
import { store2Props } from './selectors';
import { AtIcon } from 'taro-ui';
import 'taro-ui/dist/style/components/icon.scss';
import dayjs from 'dayjs';
import bgImg from '@/assets/image/index/complimentary-bg.png';
import btn from '@/assets/image/index/complimentary-btn.png';
import BG from '@/assets/image/index/complimentary-bgs.png';
import Quan from '@/assets/image/index/complimentary-quan.png';


actions().actions.loadReducer();
// @ts-ignore
@connect<Partial<T.IProps>, any>(store2Props, actions)
export default class ActivationRecord extends Component<Partial<T.IProps>, any> {
  constructor(props) {
    super(props);
    this.state = {

    };
  }

  componentDidMount() {
    this.props.actions.init();
  }
  componentWillUnmount(): void {
    this.props.actions.clean();
  }

  render() {
    const {
      main: { },
    } = this.props;

    return (
      <View className="complimentaryPage">
        <Image className="complimentaryPage-bg" src={BG} mode="widthFix" />
        <Image className="complimentaryPage-quan" src={Quan} mode="widthFix" />
        <Image className="complimentaryPage-btn" src={btn} mode="widthFix"
          onClick={() => {
            this.props.actions.action.received();
          }}
        />
      </View>
    );
  }
}
